package cn.bobohost.crmrbac.service.impl;

import cn.bobohost.crmrbac.pojo.po.RolePermission;
import cn.bobohost.crmrbac.dao.mapper.RolePermissionMapper;
import cn.bobohost.crmrbac.service.RolePermissionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 波波老师
 * @since 2025-05-21
 */
@Service
public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper, RolePermission> implements RolePermissionService {

    @Override
    public List<RolePermission> findRolePermissionListByRoleId(Long roleId) {
        //条件
        QueryWrapper<RolePermission> qw =new QueryWrapper<>();
        qw.eq("role_id",roleId);
        //查询和结果
        return baseMapper.selectList(qw);
    }
}
